package com.miaoxie;

import com.miaoxie.bean.BaseRepositoryFactoryBean;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;

@SpringBootApplication
@ComponentScan(basePackages = {"com.miaoxie.*"})
@EntityScan("com.miaoxie.domain.*")
@EnableJpaRepositories(basePackages = {"com.miaoxie.*"},
        repositoryFactoryBeanClass = BaseRepositoryFactoryBean.class//指定自己的工厂类
)
public class MiaoxieWebApplication {

    public static void main(String[] args) {
        SpringApplication.run(MiaoxieWebApplication.class, args);
    }
}
